package org.game.version01;

public class Monster extends Actor {
	protected int vx;

	public Monster(Stage stage) {
		super(stage);
		setSpriteNames(new String[] { "bicho0.gif", "bicho1.gif" });
		setFrameSpeed(35);
	}

	public void act() {
		super.act();
		x += vx;
		int izq = Stage.WIDTH - 40;
		if (x < 0 || x > izq)
			vx = -vx;
	}

	public int getVx() {
		return vx;
	}

	public void setVx(int i) {
		vx = i;
	}

	public void collision(Actor a) {
		if (a instanceof Bullet || a instanceof Bomb)
			remove();
	}

}
